<%--
  Created by IntelliJ IDEA.
  User: 86153
  Date: 2021/7/12
  Time: 19:39
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="container-fluid">
    <div class="navbar-header">
        <div><a class="navbar-brand" style="font-size:32px;" href="#">众筹平台 - 控制面板</a></div>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
        <ul class="nav navbar-nav navbar-right">
            <li style="padding-top:8px;">
                <div class="btn-group">
                    <button type="button" class="btn btn-default btn-success dropdown-toggle" data-toggle="dropdown">
                        <i class="glyphicon glyphicon-user"></i>
                        <%--
                            显示出来才发现，principal 原来是我们自己封装的 SecurityAdmin 对象</p>
                            SpringSecurity 处理完登录操作之后把登录成功的 User 对象以 principal 属性名存入了
                            UsernamePasswordAuthenticationToken 对象
                        --%>

                        <%--显示用户的昵称--%>
                        <security:authentication property="principal.originalAdmin.loginAcct"/>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="#"><i class="glyphicon glyphicon-cog"></i> 个人设置</a></li>
                        <li><a href="#"><i class="glyphicon glyphicon-comment"></i> 消息</a></li>
                        <li class="divider"></li>
                        <li><a href="admin/do/logout.html"><i class="glyphicon glyphicon-off"></i> 退出系统</a></li>
                    </ul>
                </div>
            </li>
            <li style="margin-left:10px;padding-top:8px;">
                <button type="button" class="btn btn-default btn-danger">
                    <span class="glyphicon glyphicon-question-sign"></span> 帮助
                </button>
            </li>
        </ul>
        <form class="navbar-form navbar-right">
            <input type="text" class="form-control" placeholder="查询">
        </form>
    </div>
</div>
